﻿namespace Agile.Service.Admin.WebApi
{
    /// <summary>
    /// 
    /// </summary>
    public static class FileResultExtension
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="this"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public static FileContentResult ToFileResult(this byte[] @this, string fileName)
        {
            return new FileContentResult(@this, "application/oct-stream")
            {
                FileDownloadName = fileName
            };  
        } 
    }
}
